package main.ui.actions;

import java.io.IOException;

import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;

public class LinkListener implements HyperlinkListener 
{
	@Override
	public void hyperlinkUpdate(HyperlinkEvent e) 
	{
		HyperlinkEvent.EventType type = e.getEventType();
		try 
		{
			if (type == HyperlinkEvent.EventType.ACTIVATED)
				Runtime.getRuntime().exec("cmd.exe /C start " + e.getURL());
		} 
		catch (IOException ex) 
		{

		}
	}

}
